package  
{
	import adobe.utils.CustomActions;
	import org.flixel.*;

	public class Bullet extends FlxSprite {
		
		public function Bullet() {
			super();
			createGraphic(2, 2, 0xFF40DB24);
		}
		
		override public function update():void {
				super.update();
			}
			
		public function Shoot(_x:Number, _y:Number, _velocityX:Number, _velocityY:Number, _randomness:Number = 40):void {
				x = _x;
				y = _y;
				
				velocity.x = _velocityX;
				velocity.y = (FlxU.random() * -_randomness) + (_randomness / 2);
		}
		
		public function HitObject():void {
			velocity.y = 0;
				velocity.x = 0;
				x = -200;
				y = -200;
		}
		
		override public function hitSide(Contact:FlxObject, Velocity:Number):void { HitObject()}
        override public function hitBottom(Contact:FlxObject, Velocity:Number):void { HitObject()}
        override public function hitTop(Contact:FlxObject, Velocity:Number):void { HitObject()}

	}
		
}